-
Notifications
You must be signed in to change notification settings - Fork 309
fix missing aot model SourceGenerationContext #1636
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…netesClientSourceGenerator
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR fixes the missing AOT model SourceGenerationContext by introducing a dedicated template and generator while updating tests and dependency registrations. Key changes include:
- Adding a new test method (VersionTestAsync) to validate the client's version retrieval.
- Introducing a new SourceGenerationContext template and generator.
- Removing duplicate SourceGenerationContext code from ModelExtensions.cs.template and updating generator registrations.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/E2E.Aot.Tests/MinikubeTests.cs | Added a new async test to verify version retrieval. |
src/LibKubernetesGenerator/templates/SourceGenerationContext.cs.template | Created a new AOT SourceGenerationContext template. |
src/LibKubernetesGenerator/templates/ModelExtensions.cs.template | Removed duplicate SourceGenerationContext generation code. |
src/LibKubernetesGenerator/SourceGenerationContextGenerator.cs | Added a generator for rendering the new SourceGenerationContext template. |
src/LibKubernetesGenerator/KubernetesClientSourceGenerator.cs | Registered the new SourceGenerationContextGenerator in the dependency injection container. |
Comments suppressed due to low confidence (3)
tests/E2E.Aot.Tests/MinikubeTests.cs:379
- [nitpick] The 'VersionTestAsync' method currently only checks for a non-null version. Consider asserting specific properties or format of the version to strengthen test coverage.
Assert.NotNull(version);
src/LibKubernetesGenerator/templates/ModelExtensions.cs.template:15
- [nitpick] The removal of the SourceGenerationContext generation block helps reduce duplication. Ensure that the new SourceGenerationContext template and its generator fully cover the intended behavior.
#if NET8_0_OR_GREATER
src/LibKubernetesGenerator/KubernetesClientSourceGenerator.cs:62
- [nitpick] Verify that introducing the SourceGenerationContextGenerator registration does not affect the initialization order or dependencies among the generators.
builder.RegisterType<SourceGenerationContextGenerator>();
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: brendandburns, tg123 The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
#1633